/*
 * Formation.java
 *
 * Created on 4 juin 2007, 18:04
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package Entity;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 * Entity class Formation
 *
 * @author amo
 */
@Entity
public class Formation implements Serializable
{
    
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private int id;
    private String libelle;
    private double prixParLandien;
    private double facteurBenefice;
    /** Creates a new instance of Formation */
    public Formation()
    {
        
    }
    public Formation(String lib,double prix)
    {
        setLibelle(lib);
        setPrixParLandien(prix);
    }
    
    /**
     * Gets the id of this Formation.
     * @return the id
     */
    public int getId()
    {
        return this.id;
    }
    
    /**
     * Sets the id of this Formation to the specified value.
     * @param id the new id
     */
    public void setId(int id)
    {
        this.id = id;
    }
    
    
    /**
     * Returns a string representation of the object.  This implementation constructs
     * that representation based on the id fields.
     * @return a string representation of the object.
     */
    @Override
    public String toString()
    {
        return "Entity.Formation[id=" + getId() + "]";
    }

    public String getLibelle()
    {
        return libelle;
    }

    public void setLibelle(String libelle)
    {
        this.libelle = libelle;
    }

    public double getPrixParLandien()
    {
        return prixParLandien;
    }

    public void setPrixParLandien(double prixParLandien)
    {
        this.prixParLandien = prixParLandien;
    }
    
}
